import { axios } from '@/utils/request'

const api = {

  gradeOptions: '/adminapi/material/gradeOptions',

  //新建器材
  materialAdd:'/adminapi/material/materialAdd',
  materialDelete:'/adminapi/material/materialDelete',
  materialEdit:'/adminapi/material/materialEdit',
  materialDetail:'/adminapi/material/materialDetail',
  materialList:'/adminapi/material/materialList',

  //新建实验
  experimentAdd:'/adminapi/experiment/experimentAdd',
  experimentDelete:'/adminapi/experiment/experimentDelete',
  experimentEdit:'/adminapi/experiment/experimentEdit',
  experimentDetail:'/adminapi/experiment/experimentDetail',
  experimentList:'/adminapi/experiment/experimentList',
  materialOptions:'/adminapi/experiment/materialOptions',
  learningSection: '/adminapi/experiment/learningSection',
  subjectOptions: '/adminapi/experiment/subjectOptions',
  resourceOptions: '/adminapi/resource/resourceOptions',

  //收藏模块
  collectionAdd:'/adminapi/experiment/collectionAdd',
  collectionDelete:'/adminapi/experiment/collectionDelete',


}

export default api

export function collectionAdd(parameter) {
  return axios({
    url: api.collectionAdd,
    method: 'post',
    data: parameter
  })
}

export function collectionDelete(parameter) {
  console.log('collectionDelete');
  return axios({
    url: api.collectionDelete,
    method: 'post',
    data: parameter
  })
}


//新建实验器材
export function materialAdd(parameter) {
  return axios({
    url: api.materialAdd,
    method: 'post',
    data: parameter
  })
}

export function materialDelete(parameter) {
  return axios({
    url: api.materialDelete,
    method: 'post',
    data: parameter
  })
}

export function materialEdit(parameter) {
  return axios({
    url: api.materialEdit,
    method: 'get',
    params: parameter
  })
}

export function materialDetail(parameter) {
  return axios({
    url: api.materialDetail,
    method: 'post',
    data: parameter
  })
}

//获取    materialList
export function getExperimentList(parameter) {
  return axios({
    url: api.materialList,
    method: 'get',
    params: parameter
  })
}



export function gradeOptions(parameter) {
  return axios({
    url: api.gradeOptions,
    method: 'get',
    params: parameter
  })
}

export function resourceOptions(parameter) {
  return axios({
    url: api.resourceOptions,
    method: 'get',
    params: parameter
  })
}

//新建实验器材
//新建实验器材
export function experimentAdd(parameter) {
  return axios({
    url: api.experimentAdd,
    method: 'post',
    data: parameter
  })
}

export function experimentDelete(parameter) {
  return axios({
    url: api.experimentDelete,
    method: 'post',
    data: parameter
  })
}

export function experimentEdit(parameter) {
  return axios({
    url: api.experimentEdit,
    method: 'get',
    params: parameter
  })
}

export function experimentDetail(parameter) {
  return axios({
    url: api.experimentDetail,
    method: 'post',
    data: parameter
  })
}

export function getMakeExperimentList(parameter) {
  return axios({
    url: api.experimentList,
    method: 'get',
    params: parameter
  })
}


export function materialOptions(parameter) {
  return axios({
    url: api.materialOptions,
    method: 'get',
    params: parameter
  })
}

export function subjectOptions(parameter) {
  return axios({
    url: api.subjectOptions,
    method: 'get',
    params: parameter
  })
}

export function learningSection(parameter) {
  return axios({
    url: api.learningSection,
    method: 'get',
    params: parameter
  })
}
